
---
layout: default
---

<div class="container-fluid" style="margin:20px">
  <div class="row">
    <ol class="breadcrumb">
      <li><a href="{{site.baseurl}}/">Home</a></li>
      <li><a href="{{site.baseurl}}/repos">Repos</a></li>
      <li class="active">{{ page.repo.name }}</li>
    </ol>
  </div>
  <div class="row">
    name: <b>{{ page.repo.name }}</b>
    <br>
    description: <em>{{ page.repo.description }}</em>
    <br>
    tags: {% for tag in page.repo.tags %}<span class="label label-default">{{ tag }}</span> {% endfor %}
  </div>
  <div class="row">
    &nbsp;
  </div>
  <div class="row">
    {% include instance_switch.html %}
  </div>
  <div class="row">
    {% include distro_switch.html %}
  </div>
  <div class="row">
    &nbsp;
  </div>
  <div class="row">
    <ul class="nav nav-tabs" id="content-tabs">
      <!-- Current distros -->
      <li role="presentation" class="active"><a href="#readme">
        README
      </a></li>
      <li role="presentation" class=""><a href="#packages">
        Packages
      </a></li>
      <li role="presentation" class="disabled"><a href="#repo-info">
        Repository Info
      </a></li>
      <li role="presentation" class="disabled"><a href="#related">
        Related
      </a></li>
    </ul>

  </div>
  <div id="distro-switch-content" class="tab-content">
    {% for variant in page.repo_variants %}
      <div id="{{variant[0]}}-tab" class="variant variant-{{ variant[0] }}">

        {% for distro in page.all_distros %}
          <div id="{{ prefix }}tab" class="hide distro distro-{{distro}}">
            {% if variant[1].distros contains distro %}

              <div class="tab-content" style="margin: 20px">
                <div id="readme">
                  {{ variant[1].distros[distro].readme_rendered }}
                </div>
                <div id="packages">
                  <ul>
                    {% for p in variant[1].distros[distro].packages %}
                      <li>{{ p.name }} -- {{p.version}}</li>
                    {% endfor %}
                  </ul>
                </div>
              </div>


            {% else %}
              <p><em>No known branch for <b>{{distro}}</b>.</em></p>
            {% endif %}
          </div>
        {% endfor %}
      </div>
    {% endfor %}
  <div class="row">
    &nbsp;
  </div>
</div>

<script src="{{ '/js/repo_switch.js' | prepend: site.baseurl }}"></script>

<script>
$(document).ready(function() {
  setupDistroSwitch("{{ site.distros[0] }}");
  $('#content-tabs a').click(
    function (e) {
      //e.preventDefault();
      $(this).tab('show');
      console.log(this)
    }
  );
});
</script>

